﻿using NDF.DataAccess.EntityFramework.Migrations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.Migrations;
using NDF.Test.DataAccess.NdfEFTest.Entities;

namespace NDF.Test.DataAccess.NdfEFTest
{
    public class NdfTestContextInitializer : MigrationDatabaseIfModelChanges<NdfTestContext, NdfTestContextInitializerConfiguration>
    {
    }

    public class NdfTestContextInitializerConfiguration : MigrationConfiguration<NdfTestContext>
    {
        protected override void Seed(NdfTestContext context)
        {
            Console.WriteLine("------");
            //context.Users.AddOrUpdate(
            //    new UserEntity { ID = 1, Key = "AA267968-7D43-4F4E-8F28-605AD14C5ECD".ToGuid(), Code = "000", Name = "admin", CreateDate = "2014-07-23 17:00:00".ToDateTime(), LastModifyDate = "2014-07-23 17:00:00".ToDateTime() },
            //    new UserEntity { ID = 2, Key = "09BC9CEA-A2BE-4CF9-AB59-88BBA4F05000".ToGuid(), Code = "001", Name = "test1", CreateDate = "2014-07-23 17:00:00".ToDateTime(), LastModifyDate = "2014-07-23 17:00:00".ToDateTime() },
            //    new UserEntity { ID = 3, Key = "2FDFB8C7-F10C-4E01-8DD3-AC1FA80678C2".ToGuid(), Code = "002", Name = "test2", CreateDate = "2014-07-23 17:00:00".ToDateTime(), LastModifyDate = "2014-07-23 17:00:00".ToDateTime() },
            //    new UserEntity { ID = 4, Key = "76D7185E-E0DD-4DF1-B6AB-C73D110F93AA".ToGuid(), Code = "003", Name = "test3", CreateDate = "2014-07-23 17:00:00".ToDateTime(), LastModifyDate = "2014-07-23 17:00:00".ToDateTime() },
            //    new UserEntity { ID = 5, Key = "7BFA1D5A-2B1A-4E5F-92F9-E60C571F877A".ToGuid(), Code = "004", Name = "test4", CreateDate = "2014-07-23 17:00:00".ToDateTime(), LastModifyDate = "2014-07-23 17:00:00".ToDateTime() }
            //    );
            //context.Users.AddOrUpdate(
            //    new UserEntity { ID = 1, Code = "000", Name = "admin", CreateDate = "2014-07-23 17:00:00".ToDateTime(), LastModifyDate = "2014-07-23 17:00:00".ToDateTime() },
            //    new UserEntity { ID = 2, Code = "001", Name = "test1", CreateDate = "2014-07-23 17:00:00".ToDateTime(), LastModifyDate = "2014-07-23 17:00:00".ToDateTime() },
            //    new UserEntity { ID = 3, Code = "002", Name = "test2", CreateDate = "2014-07-23 17:00:00".ToDateTime(), LastModifyDate = "2014-07-23 17:00:00".ToDateTime() },
            //    new UserEntity { ID = 4, Code = "003", Name = "test3", CreateDate = "2014-07-23 17:00:00".ToDateTime(), LastModifyDate = "2014-07-23 17:00:00".ToDateTime() },
            //    new UserEntity { ID = 5, Code = "004", Name = "test4", CreateDate = "2014-07-23 17:00:00".ToDateTime(), LastModifyDate = "2014-07-23 17:00:00".ToDateTime() }
            //    );
        }
    }
}
